local assets =
{
    Asset("ANIM", "anim/assn_suipian.zip"),
}

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddSoundEmitter()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh")
    inst.AnimState:SetBank("assn_suipian")
    inst.AnimState:SetBuild("assn_suipian")
    inst.AnimState:PlayAnimation("idle", true)

    inst.pickupsound = "metal"

    inst:AddTag("edible_NIGHTMARE")
    inst:AddTag("assn_suipian")

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    inst:AddComponent("edible")
    inst.components.edible.healthvalue = 10
    inst.components.edible.hungervalue = 10
    inst.components.edible.sanityvalue = 10
    inst.components.edible.foodtype = FOODTYPE.NIGHTMARE

    inst:AddComponent("tradable")

    inst:AddComponent("inspectable")

    inst:AddComponent("inventoryitem")

    inst:AddComponent("stackable")

    inst:AddComponent("assn_fix")

    MakeHauntableLaunchAndSmash(inst)

    return inst
end

return Prefab("assn_suipian", fn, assets)
